Add support for high/low symmetry variants in tetragonal and trigonal systems#82
Draft
Add support for high/low symmetry variants in tetragonal and trigonal systems#82
Conversation
Co-authored-by: jochym <5993422+jochym@users.noreply.github.com>
Co-authored-by: jochym <5993422+jochym@users.noreply.github.com>
Co-authored-by: jochym <5993422+jochym@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix number of independent elastic tensors for trigonal and tetragonal systems
Add support for high/low symmetry variants in tetragonal and trigonal systems
Jan 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The code treated all tetragonal and trigonal systems as having 6 independent elastic constants, but low-symmetry variants require different handling: tetragonal low (space groups 75-88) has 7 constants including C₁₆, while trigonal low (143-148) has different coupling patterns than high symmetry variants.
Changes
New symmetry functions:
tetragonal_high()/tetragonal_low()- Handle space groups 89-142 (6 constants) and 75-88 (7 constants with C₁₆)trigonal_high()/trigonal_low()- Handle space groups 149-167 and 143-148 (both 6 constants, different coupling)Automatic selection:
get_symmetry_function()- Uses spglib space group number to select appropriate symmetry functionget_elementary_deformations(),get_elastic_tensor(),get_cij_order()to use automatic selectionBackward compatibility:
tetragonal()andtrigonal()functions aliased to high symmetry variantsUsage
Space group ranges based on International Tables for Crystallography and verified against matscipy implementation.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.